##
# Copyright (c) 2010 Aldebaran Robotics All Rights Reserved


####
# CMake Script.

# Usage:

# mkdir build
# cd build
# cmake -DCMAKE_TOOLCHAIN_FILE=/path/to/aldebaran-cpp-sdk/toolchain-pc.cmake
# make

# To cross-compile, replace the toolchain file by:
# /path/to/ctc/toolchain-geode.cmake

project(helloworld)
cmake_minimum_required(VERSION 2.6.4 FATAL_ERROR)

FIND_PACKAGE(YARP REQUIRED)
FIND_PACKAGE(OpenCV REQUIRED)

INCLUDE_DIRECTORIES(${YARP_INCLUDE_DIRS})
LINK_LIBRARIES(${YARP_LIBRARIES} ${OpenCV_LIBS})

SET(CMAKE_MODULE_PATH ${YARP_MODULE_PATH})

# This includes enable you to use our CMake framework
include("${CMAKE_CURRENT_SOURCE_DIR}/bootstrap.cmake")

# Create an executable named helloworld,
# with the source : helloworld.cpp

create_bin(helloworld main.cpp)

# Tell CMake that helloworld depends on ALCOMMON.
# This will set the libraries to link helloworld with,
# the include paths, and so on
use_lib(helloworld ALCOMMON)
